From 875766dcf6ea8989bc1741ef4b704f8a30b892d9 Mon Sep 17 00:00:00 2001 From: "mwilli2@equilibrium.research" Date: Fri, 1 Oct 2004 00:34:35 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.195 (415ca61bv5y6opiJRoJ_c07c3vTfDA) Make console driver play nice with sysfs. Should work with udev now. --- linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c b/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c index d8a28bf153..fef99c0897 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c @@ -666,11 +666,13 @@ static int __init xencons_init(void) { DRV(xencons_driver)->name = "ttyS"; DRV(xencons_driver)->minor_start = 64; + DRV(xencons_driver)->name_base = 0; } else { DRV(xencons_driver)->name = "tty"; DRV(xencons_driver)->minor_start = 1; + DRV(xencons_driver)->name_base = 1; } #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) @@ -694,6 +696,10 @@ static int __init xencons_init(void) panic("Couldn't register Xen virtual console driver as %s\n", DRV(xencons_driver)->name); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + tty_register_device(xencons_driver, 0, NULL); +#endif + if ( start_info.flags & SIF_INITDOMAIN ) { xencons_priv_irq = bind_virq_to_irq(VIRQ_CONSOLE); @@ -715,6 +721,10 @@ static void __exit xencons_fini(void) { int ret; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + tty_unregister_device(xencons_driver, 0); +#endif + if ( (ret = tty_unregister_driver(DRV(xencons_driver))) != 0 ) printk(KERN_ERR "Unable to unregister Xen console driver: %d\n", ret); -- 2.30.2